<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/apsproject/schedule/Aps_DistributedTaskDate.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/apsproject/schedule/Aps_DistributedTaskDate.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Aps_DistributedTaskDate",
        setup() {
            const table = ref({
                key: "DistributedTaskDateId",
                footer: "Foots",
                cnName: "排程任务明细表",
                name: "schedule/Aps_DistributedTaskDate",
                newTabEdit: false,
                url: "/Aps_DistributedTaskDate/",
                sortName: "StartTime"
            });
            const editFormFields = ref({"ScheduleVersionId":"","ScheduleTaskId":"","MachineId":"","GroupId":"","MoCode":"","ProductsCode":"","ShiftId":"","ShiftType":"","WorkDate":"","StartTime":"","EndTime":"","Hours":"","Qty":"","Weight":"","FinishedQty":"","FinishedWeight":"","Remarks":""});
            const editFormOptions = ref([[{"dataKey":"APS_SchudeVersion","data":[],"title":"排程版本","field":"ScheduleVersionId","type":"number"},
                               {"title":"ID","field":"ScheduleTaskId","type":"number"}],
                              [{"dataKey":"BASE_Machine","data":[],"title":"设备","field":"MachineId","type":"number"},
                               {"dataKey":"BASE_Group","data":[],"title":"工序","field":"GroupId","type":"number"}],
                              [{"title":"生产任务单号","field":"MoCode"},
                               {"title":"产品","field":"ProductsCode"}],
                              [{"dataKey":"APS_Shift","data":[],"title":"班表","field":"ShiftId","type":"number"},
                               {"dataKey":"APS_DayOrNight","data":[],"title":"班次","field":"ShiftType","type":"number"}],
                              [{"title":"日期","field":"WorkDate"},
                               {"title":"开始时间","field":"StartTime"}],
                              [{"title":"结束时间","field":"EndTime"},
                               {"title":"时数（分）","field":"Hours","type":"decimal"}],
                              [{"title":"产品数量","field":"Qty","type":"number"},
                               {"title":"产品重量","field":"Weight","type":"decimal"}],
                              [{"title":"完成的数量","field":"FinishedQty","type":"decimal"},
                               {"title":"完成的重量","field":"FinishedWeight","type":"decimal"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:"DistributedTaskDateId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"ScheduleVersionId",title:"排程版本",type:"bigint",bind:{ key:"APS_SchudeVersion",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ScheduleTaskId",title:"ID",type:"bigint",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"MachineId",title:"设备",type:"bigint",bind:{ key:"BASE_Machine",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"GroupId",title:"工序",type:"bigint",bind:{ key:"BASE_Group",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"MoCode",title:"生产任务单号",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"ProductsCode",title:"产品",type:"string",width:180,showOverflowTooltip:true,align:"left"},
                       {field:"ShiftId",title:"班表",type:"bigint",bind:{ key:"APS_Shift",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ShiftType",title:"班次",type:"int",bind:{ key:"APS_DayOrNight",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"WorkDate",title:"日期",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"StartTime",title:"开始时间",type:"datetime",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"EndTime",title:"结束时间",type:"datetime",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"Hours",title:"时数（分）",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Qty",title:"产品数量",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Weight",title:"产品重量",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"FinishedQty",title:"完成的数量",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"FinishedWeight",title:"完成的重量",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Status",title:"状态",type:"int",bind:{ key:"APS_TaskStatus",data:[]},width:120,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
